//获取应用实例
const app = getApp()

Page({
  data: {
    inputShowed: false,
    inputVal: ''
  },
  showInput: function () {
    this.setData({
      inputShowed: true
    });
  },
  //取消按钮
  hideInput: function () {
    this.setData({
      inputVal: '',
      inputShowed: false
    });
  },
  //清空按钮点击事件
  clearInput: function () {
    this.setData({
      inputVal: ''
    });
  },
  //监听输入内容
  inputTyping: function (e) {
    this.setData({
      inputVal: e.detail.value
    });
  }

});